#!/bin/sh

if [ ! -d "${DASD}" ]
then
    echo "Did you set up the enviroment? Try 'source env.sh'"
    exit 1
fi

#
# Run CTSS Setup Job using tape as load.
#
if [ "$1" = "" ];then
   echo "usage: setupctss setupimage [s709options]"
   exit 1
fi

#
# Run CTSS image
#
s709 $2 -C8 -mCTSS -c${CMD}/utilctss.cmd p=${TMP}/print \
	a1r=${TAPE}/setup.tap a9=${TMP}/trace.bin b2r=$1 $3 $4 $5 $6 \
	cd00=${DASD}/DISK1.BIN cn01=${DASD}/DRUM1.BIN cd42=${DASD}/DISK2.BIN  \
	gh00=${DASD}/DRUM2.BIN gh01=${DASD}/DRUM3.BIN

rm -f  ${TMP}/trace.bin
mv  printlog.lst ${OUTPUT}
